package com.xidian.edu.cn.product.feign;

import com.xidian.edu.cn.common.utils.R;
import com.xidian.edu.cn.product.feign.fallback.SeckillFeignServiceFallBack;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "seckill", fallback = SeckillFeignServiceFallBack.class)//默认在出错之后使用后面这个方法进行回调
public interface SeckillFeignService {

    @GetMapping("/sku/seckill/{skuId}")
    R getSkuSeckillInfo(@PathVariable("skuId") Long skuId);

}
